Update dependencies, require react-intl v7 and use Node.js 22 - #9
Merged
Merged
Conversation
ThoSap
force-pushed
the
upgrade-to-react-intl-v7
branch
from
June 30, 2025 15:22
9738196 to
3bfb772
Compare
…slint-config-prettier
ThoSap
marked this pull request as ready for review
June 30, 2025 15:46
There was a problem hiding this comment.
Pull Request Overview
This PR updates all dependencies to their latest compatible versions, requires React-Intl v7, and raises the minimum Node.js target to version 22.
- Bump of core and dev dependencies (including
react-intlto v7 and@types/react) - Added
"lib": ["ES2021.Intl"]to both ESM and CJS build configs - Switched CI and
.node-versionto Node.js 22 and Ubuntu 24.04, and expanded the test matrix
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.build.esm.json | Added ES2021.Intl to lib for Intl type support |
| tsconfig.build.cjs.json | Added ES2021.Intl to lib for Intl type support |
| readme.md | Fixed stray whitespace in import statement |
| package.json | Updated dependencies, devDependencies, and peerDependencies |
| .node-version | Set Node.js version to 22 |
| .github/workflows/release.yml | Updated NODE_VERSION to 22 and runner to Ubuntu 24.04 |
| .github/workflows/main.yml | Updated runners to Ubuntu 24.04 and added Node 22 to the matrix |
Comments suppressed due to low confidence (1)
.github/workflows/main.yml:15
- [nitpick] If Node.js v16 support is being removed, you may want to remove it from this test matrix to keep CI focused on supported runtimes.
node_version: [16, 18, 20, 22]
| @@ -52,32 +52,33 @@ | |||
| "postversion": "git push && git push --tags" | |||
| }, | |||
| "dependencies": { | |||
There was a problem hiding this comment.
Since Node.js v16 support is being dropped in favor of v18+ (or now v22), consider adding or updating the engines.node field in package.json to ">=18.0.0" (or ">=22.0.0") to explicitly communicate the new minimum runtime requirement.
Member
Author
There was a problem hiding this comment.
We decided to drop Node.js v16 support.
lukasvice
approved these changes
Jul 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm unsure how the tests against Node.js 16 of this package worked previously in the first place, as the
package-lock.jsonfile from the last commit onmainalready requires at least Node.js 18.See
zod-locales-formatjs/package-lock.json
Line 1664 in 1b2a819
Maybe it is time to drop the Node.js v16 support if we want to use newer versions of ESLint v7 (the
typescript-eslint/eslint-plugin@7.0.0actually should not support Node 16 in the first place) or Jest.As a workaround, I specified version
7.2.0(downgrading from7.3.1), which did not yet fix the Node engine to>= ^18.X.X.See
correct engines.node constraints in package.jsonin https://github.com/typescript-eslint/typescript-eslint/releases/tag/v7.3.0typescript-eslint/typescript-eslint#8671
As you can see in the output of the run https://github.com/aboutbits/zod-locales-formatjs/actions/runs/15976236601/job/45059830133 of the commit 9738196, I used the "latest" compatible versions of ESLint and Jest before the force push.
Remove react-intl v6 support
The addition of
"lib": ["ES2021.Intl"],is required due tohttps://github.com/formatjs/formatjs/releases/tag/react-intl%407.0.0
formatjs/formatjs@4713e1b
formatjs/formatjs@31b832f
We also have to drop the support for

react-intlv6, else this won't compile:Due to this, we either create a new major release
v1.0.0, or a new@aboutbits/zod-locales-formatjs@0.2.0release with a breaking change notice.Diff
Before

After
